	<td valign="top" align="center" class="html">
<?php
$base_url= 'index.php?';
if($_GET['start'])
	$s = $_GET['start'];
else
	$s = 0; 
$query = mysql_query("SELECT * FROM tbl_product"); 
$tongsodong = mysql_num_rows($query);
if($tongsodong==0){
?>
Sản phẩm chưa được cập nhật!
<?php
}
if($tongsodong >= $soproduct)
	$str = mysql_query("SELECT * FROM tbl_product limit $s,$soproduct");
else
	$str = mysql_query("SELECT * FROM tbl_product");
?>
<table width="100%" border="0">
<tr>
	<?php
	$d = 0;
	while($rows = mysql_fetch_array($str)){
		$d = $d+1;
	?>
	<td width="150" align="center">
	<a href="?mod=product&act=detail&id=<?php echo $rows['id']; ?>">
	<img src="<?php echo $rows['photo']; ?>" width="100" height="100" border="0" />
	<br />
		<b>
		<?php
			$name = truncateString($rows['name'], 40, true);
			echo $name; 		
		?>
		</b>
	<br />
	</td>
	<?php	
		if($d%3==0)
		echo "</tr>";
	}
	?>
</tr>
</table>
	<?php
	echo pagenav($base_url, $s, $tongsodong, $soproduct);
	?>
	
	</td>